from pydantic import BaseModel, Field

class SettingsBase(BaseModel):
    """Base settings schema with common attributes."""
    api_url: str = Field(..., description="API URL for external service")
    api_key: str = Field(..., description="API key for authentication")
    model: str = Field(..., description="Model name to use")

class SettingsCreate(SettingsBase):
    """Schema for creating settings."""
    pass

class SettingsUpdate(SettingsBase):
    """Schema for updating settings."""
    pass

class SettingsResponse(SettingsBase):
    """Schema for settings response."""
    id: int

    class Config:
        """Pydantic configuration."""
        from_attributes = True
